<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>MakePaymentSC2TC3</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">MakePaymentSC2TC3</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Scenario 2:  Unsuccessful Payment-->
<!--Test Case 3: Unsuccessful Combo payment-->
<!---->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<!--Login-->
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User7</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass7</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--We in Customer portal?-->
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<!--Search Flights-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<!--No filter-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[2]</td>
	<td></td>
</tr>
<!--2nd one-->
<!--Make Reservation-->
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Fill in all the stuff-->
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Leina</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Locksterr</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>A11</td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='page1']/div/label[2]/span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='mealOption'])[2]</td>
	<td></td>
</tr>
<!--Make the reservation-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are in the payment page-->
<tr>
	<td>assertTextPresent</td>
	<td>Payment</td>
	<td></td>
</tr>
<!--Don't pay-->
<tr>
	<td>assertTextPresent</td>
	<td>Price: 200.0</td>
	<td></td>
</tr>
<!--Choose Credit-->
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>0</td>
</tr>
<tr>
	<td>type</td>
	<td>name=credit</td>
	<td>0</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are on the right page-->
<tr>
	<td>assertTitle</td>
	<td>Payment Error</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td>Inadequate Amount</td>
	<td></td>
</tr>
<!--Repeat for Adding more than the amount-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User7</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass7</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[2]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Fill in all the stuff-->
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Anime</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Girl</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>A11</td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='page1']/div/label[2]/span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='mealOption'])[2]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=credit</td>
	<td>600</td>
</tr>
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>600</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are on the right page-->
<!--Check if we get an error-->
<tr>
	<td>assertTitle</td>
	<td>Payment Error</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td>Your paid more than the price. Please go back and adjust your payment</td>
	<td></td>
</tr>
<!--Repeat for an invalid number like a character (no number)-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User7</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass7</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[2]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we made a reservation-->
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Anime</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Girl</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>A11</td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='page1']/div/label[2]/span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='mealOption'])[2]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=credit</td>
	<td>8Bitch!!</td>
</tr>
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>8Bitch!!</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we got an error!-->
<tr>
	<td>assertTitle</td>
	<td>Payment Error</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td>Invalid Number</td>
	<td></td>
</tr>
</tbody></table>
</body>
</html>
